<?php
	include 'redirectUser.php';
	$user = $_SESSION['curUser'];

	if(ParamUtils::get("send") != null){
		$user->setName(ParamUtils::getString("name"));
		$user->setSurname(ParamUtils::getString("surname"));
		$user->setAddress(ParamUtils::getString("address"));
		$user->setCity(ParamUtils::getString("city"));
		$user->setPhone(ParamUtils::getString("phone"));
		UserUtils::modify($user);
	}
?>


<form action="bookmarks.php?page=profile" method="post">

	<div style="position: absolute; left: 219px; top: 70px;">
		
	
	<table>
		<tr>
			<td colspan="2"></td>
		</tr>
		
		<tr>
			<td> <b>Imie</b> </td>	<td> <input type="text" value="<?php echo $user->getName();?>" name="name" />	</td>
		</tr>
		<tr>
			<td> <b>Nazwisko</b> </td>	<td> <input type="text" value="<?php echo $user->getSurname();?>" name="surname" />	</td>
		</tr>
		<tr>
			<td> <b>Adres</b> </td>	<td> <input type="text" value="<?php echo $user->getAddress();?>" name="address" />	</td>
		</tr>
		<tr>
			<td> <b>Miasto</b> </td>	<td> <input type="text" value="<?php echo $user->getCity();?>" name="city"/>	</td>
		</tr>
		<tr>
			<td> <b>Telefon</b> </td>	<td> <input type="text" value="<?php echo $user->getPhone();?>" name="phone"/>	</td>
		</tr>
		<tr>
			<td colspan="2"> <input type="hidden" name="send" value="true"/></td>
		</tr>
		<tr>
			<td colspan="2"><input type="submit" value="Zapisz"> </td>
		</tr>
	
	</table>		

	</div>




</form>